import request from "@/utils/request";

/**
 * 获取中药知识管理列表
 * @param {Object} params - 查询参数
 * @returns {Promise}
 */
export function getZhongYaoKnowledgeList_API(query) {
	return request({
		url: "/ht/t_herb_knowledge/query",
		method: "GET",
		params:query,
	});
}

/* 新增中药知识管理列表 */
export function addZhongYaoKnowledgeList_API(data) {
	return request({
		url: "/ht/t_herb_knowledge/insert",
		method: "POST",
		data,
	});
}

/* 编辑中药知识管理列表 */
export function editZhongYaoKnowledgeList_API(data) {
	return request({
		url: "/ht/t_herb_knowledge/update",
		method: "PUT",
		data,
	});
}

/* 编辑中药知识管理列表 */
export function delZhongYaoKnowledgeList_API(query) {
	return request({
		url: "/ht/t_herb_knowledge/delete_by_id",
		method: "DELETE",
		params:	query,
	});
}

/**
 * 获取药膳知识管理列表
 * @param {Object} params - 查询参数
 * @returns {Promise}
 */
export function getRecipesKnowledgeList_API(query) {
	return request({
		url: "/ht/t_diet_match/query",
		method: "GET",
		params:query,
	});
}

/* 新增药膳知识管理列表 */
export function addRecipesKnowledgeList_API(data) {
	return request({
		url: "/ht/t_diet_match/insert",
		method: "POST",
		data,
	});
}

/* 编辑药膳知识管理列表 */
export function editRecipesKnowledgeList_API(data) {
	return request({
		url: "/ht/t_diet_match/update",
		method: "PUT",
		data,
	});
}

/* 编辑药膳知识管理列表 */
export function delRecipesKnowledgeList_API(query) {
	return request({
		url: "/ht/t_diet_match/delete_by_id",
		method: "DELETE",
		params:	query,
	});
}
